<template>
	<el-form ref="form" :model="text" label-width="70px" >
		<el-form-item label="文本内容">
			<el-input v-model="text.content" type="text" placeholder="请输入文本内容" @change="handleChange"></el-input>
		</el-form-item>
	</el-form>
</template>
<script>
	
	
	export default {
		name: 'UIContent',
		props: {
			value: {
				type: Object,
				required: true
			}
		},
		data() {
			return {
				text: {
					content:this.value.text
				}
			}
		},
		watch:{
			value(new_val,old_val){
				this.text.content=new_val.text
			}
		},
		methods: {
			handleChange() {
				this.$emit('change', {
					key: 'text',
					value: this.text.content
					// value:this.value.text
				})
			}
		}
	}
</script>
